package com.qf.day04;

public class Demo01 {
    /**
     * 拷贝数组的方法，把原数组中的内容拷贝到新数组中
     *
     * @param arr1 原数组
     * @param arr2 新数组
     */
    public static void copyArr(int[] arr1, int[] arr2) {
        for (int i = 0; i < arr1.length; i++) {
            arr2[i] = arr1[i];
            System.out.print(  arr2[i] + " ");
        }
    }

    public static void main(String[] args) {
        int[] arr1 = {13,34,56,7,8};
        int[] arr2 = new int[5];
        copyArr(arr1,arr2);
    }
}
